<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String contextPath = request.getContextPath();
	Dingdan dd = (Dingdan) request.getAttribute("dd");
	Map<String,Object> param = new HashMap<String,Object>();
	param.put("khzy",UserContext.getUserContext(request).getUserid());

%>
<%@page import="com.zhangyj.component.ToolBar"%>
<%@page import="com.zhangyj.entitis.Dingdan"%>
<%@page import="com.zhangyj.impl.UserContext"%>
<%@page import="java.net.URLEncoder"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%@include file="/WEB-INF/jsps/head.jsp"%>
<style type="text/css">
.textbox {
	width: 100%;
}
.gridlayout {
	width:70%;
}
.gridlayout td {
	height: 30px;
	padding-left: 10px;
}
</style>
<script type="text/javascript">
function uf_ok() {
	var form = document.forms["form1"];
	if(form["fhy"].value=="") {
		alert("请填写发货人!");
		return;
	}
	form.submit();
}
function uf_print() {
	var form = document.forms["form1"];
	var url = "<%=contextPath%>/order/print.do?ddid=" + form["ddid"].value;
	url = _buildUrl(url);
	window.open(url);
}
function uf_onload() {
	<%
		String msg = (String)request.getAttribute("msg");
	if (msg != null) {%>
		alert("<%=msg%>");
	<%}%>
}
</script>
</head>
<body onload="uf_onload()">
<%
	ToolBar toolbar = new ToolBar();
	toolbar.setTitle("订单发货");
	toolbar.put(new ToolBar.Item("发货", "uf_ok()"));
	toolbar.put(new ToolBar.Item("打印", "uf_print()"));
	toolbar.put(new ToolBar.Item("返回", "_setLocation('" + contextPath
			+ "/order/fhlist.do')"));
	toolbar.writer(out);
%>
<div class="subcontent">
<form id="form1" name="form1" action="<%=contextPath%>/order/fhsave.do"
	method="post"><input type="hidden" name="ddid"	value="<%=dd.getDdid()%>" />
<%=com.zhangyj.entitis.SystemParam.getSystemParam(request).toInput() %>
<table class="gridlayout">
	<tr>
		<td>订单编号</td>
		<td><%=dd.getDdbh()%></td>
		<td>制单时间</td>
		<td><%=dd.getZdsj()%></td>
		<td>制单人</td>
		<td><%=dd.getZdr()%></td>
	</tr>
	<tr>
		<td>会员编号</td>
		<td><%=dd.getHybh()%></td>
		<td>会员姓名</td>
		<td><%=dd.getHyxm()%></td>
		<td>会员级别</td>
		<td><%=dd.getHyjb()%></td>
	</tr>

	<tr>
		<td>总金额</td>
		<td colspan="2"><%=dd.getZje()%></td>
		<td>账户余额</td>
		<td colspan="2"><%=dd.getZhye()%></td>
	</tr>
	<tr>
		<td>送货地址</td>
		<td colspan="5"><%=dd.getShdz()%></td>
	</tr>
	<tr>
		<td>送货邮编</td>
		<td colspan="2"><%=dd.getShyb()%></td>
		<td>送货电话</td>
		<td colspan="2"><%=dd.getShdh()%></td>
	</tr>


	<tr>
		<td>定单备注</td>
		<td colspan='5'><%=dd.getDdbz()%></td>
	</tr>
	<tr>
		<td>内部备注</td>
		<td colspan='5'><%=dd.getNbbz()%></td>
	</tr>
	<tr>
		<td>审核人员</td>
		<td colspan="2"><%=dd.getShry()%></td>
		<td>审核时间</td>
		<td colspan="2"><%=dd.getShsj()%></td>

	</tr>
	<tr>
		<td>开单人员</td>
		<td colspan="2"><%=dd.getKdry()%></td>
		<td>开单时间</td>
		<td colspan="2"><%=dd.getKdsj()%></td>
	</tr>
	<tr>
		<td>发货员</td>
		<td colspan="2"><input class="textbox" 
			name="fhy" value="<%=dd.getFhy().trim()%>" type="text" /></td>
		<td>发货时间</td>
		<td colspan="2"><input class="textbox" readonly="readonly"
			name="fhsj" value="<%=dd.getFhsj()%>" type="text" /></td>
	</tr>
	<tr>
		<td>订单标识</td>
		<td colspan="2"><%=Dingdan.ZFBSLABEL[dd.getZfbs()]%></td>
		<td>财务审核标志</td>
		<td colspan="2"><%=dd.getCwsh()==0?"未审核":"已审核"%></td>

	</tr>
</table>
</form>
</div>
</body>
</html>